package String;

public class MatchesDemo {
    public static void main(String[] args) {
     //  [a-zA-Z0-9]+@[a-zA-Z0-9]+(\.[a-zA-z]+)+
        String email="jdfshajkfhasjk";
        String regex="[a-zA-Z0-9]+@[a-zA-Z0-9]+(\\.[a-zA-Z]+)+";
        boolean match=email.matches(regex);
        if(match==true){
            System.out.println("格式正确");
        }else{
            System.out.println("格式错误");
        }
        String dell="hdasjdsdkaaskll";
        String dull="";
        boolean math=dell.matches(dull);







    }
}
